import request from '@/utils/request'

// 获取组件树
export function subgroup_tree(data) {
    return request({
        url: '/system/report/component/query',
        method: 'post',
        data: data
    })
}

// 获取报表组件详情
export function getComponentInfo(data) {
  return request({
    url: '/system/report/component/getComponent',
    method: 'post',
    data: data
  })
}

// 新增组件类型
export function subgroup_addType(data) {
    return request({
        url: '/system/report/component/addType',
        method: 'post',
        data: data
    })
}
// 编辑组件类型
export function subgroup_editType(data) {
    return request({
        url: '/system/report/component/editType',
        method: 'post',
        data: data
    })
}
// 获取默认图表
export function subgroup_echartTemplate(data) {
    return request({
        url: '/system/report/component/echart',
        method: 'post',
        data: data
    })
}
// 删除组件类型
export function subgroup_removeType(data) {
    return request({
        url: '/system/report/component/removeType',
        method: 'post',
        data: data
    })
}
// 删除组件
export function subgroup_remove(data) {
    return request({
        url: '/system/report/component/remove',
        method: 'post',
        data: data
    })
}
// 获取数据源列表
export function subgroup_datasourceList(data) {
    return request({
        url: '/system/report/component/datasourceList',
        method: 'post',
        data: data
    })
}
// 获取字段列表
export function subgroup_selectIndexList(data) {
    return request({
        url: '/system/report/component/selectIndexList',
        method: 'post',
        data: data
    })
}
// 新增组件
export function subgroup_add(data) {
    return request({
        url: '/system/report/component/add',
        method: 'post',
        data: data
    })
}
export function subgroup_test(data) {
    return request({
        url: '/system/report/component/test',
        method: 'post',
        data: data
    })
}
// 编辑组件
export function subgroup_edit(data) {
    return request({
        url: '/system/report/component/edit',
        method: 'post',
        data: data
    })
}
